﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace Knlght.Common
{
    /// <summary>
    /// 配置
    /// </summary>
    public static class DConfig
    {
        /// <summary>
        /// DES加密密钥
        /// </summary>
        public const string DESKEY = "TLSOCGOV";

        /// <summary>
        /// DES加密密钥
        /// </summary>
        public const string DESKEY_License = "TLSOCGOV";

        /// <summary>
        /// API加密密钥
        /// </summary>
        public const string DESKEY_API = "TLSOCGOVAPI_";

        /// <summary>
        /// 是否打开机器码验证
        /// </summary>
        public const bool IsOpenMachineCodeLicense = false;

        //123:BFEBFBFF000006F6|00:1A:A0:11:12:8C
        public const string list_ComputerCPU = "BFEBFBFF000306A9";
        public const string list_ComputerMAC = "E0:3F:49:16:98:49";


        /// <summary>
        /// EXT提取函数命名空间
        /// </summary>
        public const string D_X = "D_X";

        /// <summary>
        /// SHA1
        /// </summary>
        public const string SHA1 = "SHA1";

        /// <summary>
        /// MD5
        /// </summary>
        public const string MD5 = "MD5";

        /// <summary>
        /// LOGINFO 
        /// </summary>
        public const string LOG_INFO = "logInfo";

        /// <summary>
        /// LOGERROR
        /// </summary>
        public const string LOG_ERROR = "logError";

        /// <summary>
        /// LOGVISIT
        /// </summary>
        public const string LOG_VISIT = "logVisit";

        /// <summary>
        /// LOGAPI
        /// </summary>
        public const string LOG_API = "logAPI";

        /// <summary>
        /// 密钥向量 
        /// </summary>
        public static readonly byte[] KEYS = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF };

        /// <summary>
        /// 日志配置
        /// </summary>
        public static readonly string LOG_CONFIG = HttpRuntime.AppDomainAppPath + "/log4net.config";

        /// <summary>
        /// Nhibernate配置
        /// </summary>
        public static readonly string NHI_CONFIG = HttpRuntime.AppDomainAppPath + "/nhibernate.config";

        /// <summary>
        /// 缓存文件夹
        /// </summary>
        public static readonly string CACHE_PATH = HttpRuntime.AppDomainAppPath + "/UpFile/Cache";

        /// <summary>
        /// 缓存文件夹
        /// </summary>
        public const string CACHE_PAGE_PATH = "~/UpFile/Cache/";

        /// <summary>
        /// 主目录
        /// </summary>
        public const string PAGE_MAIN = "~/";

        /// <summary>
        /// 附件目录
        /// </summary>
        public const string ANNEX_PAGE_PATH = "~/UpFile/Annex/";

        /// <summary>
        /// 用户图标
        /// </summary>
        public const string USERPIC_PAGE_PATH = "~/UpFile/UserPic/";

        /// <summary>
        /// 图片文件
        /// </summary>
        public const string PIC_PAGE_PATH = "~/UpFile/Pic/";

        /// <summary>
        /// 一般文件
        /// </summary>
        public const string FILE_PAGE_PATH = "~/UpFile/File/";

        /// <summary>
        /// 网页错误
        /// </summary>
        public const string PAGE_ERROR = "~/Error/ErrorPage.htm";

        /// <summary>
        /// 无访问权限
        /// </summary>
        public const string PAGE_NOACCESS = "~/Error/NoAccess.htm";

        /// <summary>
        /// 无此文件
        /// </summary>
        public const string PAGE_NOFOUND = "~/Error/FileNotFound.htm";

        /// <summary>
        /// 网站维护中
        /// </summary>
        public const string PAGE_MAINTENANCE = "~/Error/Maintenance.htm";

        /// <summary>
        /// 网站无授权
        /// </summary>
        public const string PAGE_NOLICENSE = "~/Error/NoLicense.htm";


        /// <summary>
        /// 图片不存在
        /// </summary>
        public const string NO_IMG = "~/UpFile/NoImg.jpg";
    }
}
